<template>
	<u-modal :show="show" @confirm="ok" :show-title="false" ref="uModal" :show-cancel-button="true" :async-close="true">
		<u-form label-position="top" :model="$props.params" ref="uForm">
			<slot></slot>
		</u-form>
	</u-modal>
</template>

<script>
import util from '@/utils/util'
import {form} from '@/mixins'

export default {
	mixins: [form],
	props: {
		title: {
			type: String,
			default: '确定'
		}
	},
	data(){
		return {
			show: false
		}
	},
	computed: {
		rules() {
			if(this.$props.rules){
				return this.$props.rules
			}
			// #ifdef H5
			return this.$parent.$parent.rules
			// #endif
			// #ifndef H5
			return this.$parent.rules
			// #endif
		}
	}
}
</script>